import request from '@/utils/request'

export function getRoutes (params) {
    return request({
        url: '/api/role/getMenuAuthTree',
        method: 'get',
        params
    })
}

export function getRoles () {
    return request({
        url: '/api/role/get',
        method: 'get'
    })
}

export function addRole (data) {
    return request({
        url: '/api/role/add',
        method: 'post',
        data
    })
}

export function updateRole (data) {
    return request({
        url: `/api/role/updateRoleMenuAuth`,
        method: 'post',
        data
    })
}

//获取游戏列表
export function getGameList (params) {
    return request({
        url: `/api/game/getGameList`,
        method: 'get',
        params
    })
}
